%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for queries/v4/connections-blankcursor"
    Bucket0("Bucket 0 (root)<br /><br />1: <br />ᐳ: 11, 12, 76, 77, 78, 13, 15, 22<br />2: 10, 19, 26, 31<br />ᐳ: Access[47], Access[50]<br />3: 14, 21, 28, 33<br />ᐳ: 27, 29, 30, 32, 34, 35<br />4: 36, 39<br />ᐳ: 46, 48, 49, 51, 52, 53, 54, 55"):::bucket
    Bucket1("Bucket 1 (nullableBoundary)<br />Deps: 14, 47, 36, 30, 48, 53<br /><br />ROOT Connectionᐸ10ᐳ[14]"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 21, 50, 39, 35, 51, 55<br /><br />ROOT Connectionᐸ19ᐳ[21]"):::bucket
    Bucket5("Bucket 5 (listItem)<br />Deps: 47<br /><br />ROOT __Item{5}ᐸ36ᐳ[42]"):::bucket
    Bucket6("Bucket 6 (listItem)<br />Deps: 50<br /><br />ROOT __Item{6}ᐸ39ᐳ[44]"):::bucket
    Bucket7("Bucket 7 (nullableBoundary)<br />Deps: 42, 43, 61<br /><br />ROOT Edge{5}[43]"):::bucket
    Bucket8("Bucket 8 (nullableBoundary)<br />Deps: 44, 45, 63<br /><br />ROOT Edge{6}[45]"):::bucket
    Bucket9("Bucket 9 (nullableBoundary)<br />Deps: 64<br /><br />ROOT PgSelectSingle{7}ᐸpersonᐳ[64]"):::bucket
    Bucket10("Bucket 10 (nullableBoundary)<br />Deps: 65<br /><br />ROOT PgSelectSingle{8}ᐸpersonᐳ[65]"):::bucket
    end
    Bucket0 --> Bucket1 & Bucket2
    Bucket1 --> Bucket5
    Bucket2 --> Bucket6
    Bucket5 --> Bucket7
    Bucket6 --> Bucket8
    Bucket7 --> Bucket9
    Bucket8 --> Bucket10

    %% plan dependencies
    PgSelect10[["PgSelect[10∈0] ➊<br />ᐸperson+1ᐳ<br />More deps:<br />- Constantᐸ2ᐳ[76]"]]:::plan
    Object13{{"Object[13∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Lambda15{{"Lambda[15∈0] ➊<br />ᐸparseCursorᐳ<br />More deps:<br />- Constantᐸ''ᐳ[77]"}}:::plan
    Object13 & Lambda15 --> PgSelect10
    Connection14[["Connection[14∈0] ➊<br />ᐸ10ᐳ<br />Dependents: 4<br />More deps:<br />- Constantᐸ2ᐳ[76]"]]:::plan
    PgSelect10 & Lambda15 --> Connection14
    PgSelect19[["PgSelect[19∈0] ➊<br />ᐸperson+1ᐳ<br />More deps:<br />- Constantᐸ2ᐳ[76]"]]:::plan
    Lambda22{{"Lambda[22∈0] ➊<br />ᐸparseCursorᐳ<br />More deps:<br />- Constantᐸ'27'ᐳ[78]"}}:::plan
    Object13 & Lambda22 --> PgSelect19
    Connection21[["Connection[21∈0] ➊<br />ᐸ19ᐳ<br />Dependents: 4<br />More deps:<br />- Constantᐸ2ᐳ[76]"]]:::plan
    PgSelect19 & Lambda22 --> Connection21
    PgSelect26[["PgSelect[26∈0] ➊<br />ᐸperson(aggregate)ᐳ<br />More deps:<br />- Constantᐸ2ᐳ[76]"]]:::plan
    Object13 & Lambda15 --> PgSelect26
    PgSelect31[["PgSelect[31∈0] ➊<br />ᐸperson(aggregate)ᐳ<br />More deps:<br />- Constantᐸ2ᐳ[76]"]]:::plan
    Object13 & Lambda22 --> PgSelect31
    Access11{{"Access[11∈0] ➊<br />ᐸ2.pgSettingsᐳ"}}:::plan
    Access12{{"Access[12∈0] ➊<br />ᐸ2.withPgClientᐳ"}}:::plan
    Access11 & Access12 --> Object13
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ"]:::plan
    __Value2 --> Access11
    __Value2 --> Access12
    First27{{"First[27∈0] ➊"}}:::plan
    PgSelectRows28[["PgSelectRows[28∈0] ➊"]]:::plan
    PgSelectRows28 --> First27
    PgSelect26 --> PgSelectRows28
    PgSelectSingle29{{"PgSelectSingle[29∈0] ➊<br />ᐸpersonᐳ"}}:::plan
    First27 --> PgSelectSingle29
    First32{{"First[32∈0] ➊"}}:::plan
    PgSelectRows33[["PgSelectRows[33∈0] ➊"]]:::plan
    PgSelectRows33 --> First32
    PgSelect31 --> PgSelectRows33
    PgSelectSingle34{{"PgSelectSingle[34∈0] ➊<br />ᐸpersonᐳ"}}:::plan
    First32 --> PgSelectSingle34
    ConnectionItems36[["ConnectionItems[36∈0] ➊<br />Dependents: 3<br />More deps:<br />- Connection[14]"]]:::plan
    ConnectionItems39[["ConnectionItems[39∈0] ➊<br />Dependents: 3<br />More deps:<br />- Connection[21]"]]:::plan
    First46{{"First[46∈0] ➊<br />More deps:<br />- ConnectionItems[36]"}}:::plan
    Access47{{"Access[47∈0] ➊<br />ᐸ10.cursorDetailsᐳ<br />Dependents: 3"}}:::plan
    PgSelect10 --> Access47
    First49{{"First[49∈0] ➊<br />More deps:<br />- ConnectionItems[39]"}}:::plan
    Access50{{"Access[50∈0] ➊<br />ᐸ19.cursorDetailsᐳ<br />Dependents: 3"}}:::plan
    PgSelect19 --> Access50
    Last52{{"Last[52∈0] ➊<br />More deps:<br />- ConnectionItems[36]"}}:::plan
    Last54{{"Last[54∈0] ➊<br />More deps:<br />- ConnectionItems[39]"}}:::plan
    PageInfo24{{"PageInfo[24∈1] ➊<br />More deps:<br />- Connection[14]"}}:::plan
    Access56{{"Access[56∈1] ➊<br />ᐸ14.hasNextPageᐳ<br />More deps:<br />- Connection[14]"}}:::plan
    Access58{{"Access[58∈1] ➊<br />ᐸ14.hasPreviousPageᐳ<br />More deps:<br />- Connection[14]"}}:::plan
    PageInfo25{{"PageInfo[25∈2] ➊<br />More deps:<br />- Connection[21]"}}:::plan
    Access57{{"Access[57∈2] ➊<br />ᐸ21.hasNextPageᐳ<br />More deps:<br />- Connection[21]"}}:::plan
    Access59{{"Access[59∈2] ➊<br />ᐸ21.hasPreviousPageᐳ<br />More deps:<br />- Connection[21]"}}:::plan
    Edge43{{"Edge[43∈5]"}}:::plan
    __Item42[/"__Item[42∈5]<br />ᐸ36ᐳ<br />More deps:<br />- ConnectionItems[36]"\]:::itemplan
    PgCursor61{{"PgCursor[61∈5]<br />More deps:<br />- Access[47]"}}:::plan
    __Item42 & PgCursor61 --> Edge43
    __Item42 --> PgCursor61
    Edge45{{"Edge[45∈6]"}}:::plan
    __Item44[/"__Item[44∈6]<br />ᐸ39ᐳ<br />More deps:<br />- ConnectionItems[39]"\]:::itemplan
    PgCursor63{{"PgCursor[63∈6]<br />More deps:<br />- Access[50]"}}:::plan
    __Item44 & PgCursor63 --> Edge45
    __Item44 --> PgCursor63
    PgSelectSingle64{{"PgSelectSingle[64∈7]<br />ᐸpersonᐳ"}}:::plan
    __Item42 --> PgSelectSingle64
    PgSelectSingle65{{"PgSelectSingle[65∈8]<br />ᐸpersonᐳ"}}:::plan
    __Item44 --> PgSelectSingle65
    PgClassExpression66{{"PgClassExpression[66∈9]<br />ᐸ__person__.”id”ᐳ"}}:::plan
    PgSelectSingle64 --> PgClassExpression66
    PgClassExpression68{{"PgClassExpression[68∈9]<br />ᐸ__person__...full_name”ᐳ"}}:::plan
    PgClassExpression66 o--o PgClassExpression68
    PgClassExpression70{{"PgClassExpression[70∈9]<br />ᐸ__person__.”email”ᐳ"}}:::plan
    PgClassExpression68 o--o PgClassExpression70
    PgClassExpression72{{"PgClassExpression[72∈9]<br />ᐸ__person__.”config”ᐳ"}}:::plan
    PgClassExpression70 o--o PgClassExpression72
    PgClassExpression74{{"PgClassExpression[74∈9]<br />ᐸ__person__...n_from_ip”ᐳ"}}:::plan
    PgClassExpression72 o--o PgClassExpression74
    PgClassExpression67{{"PgClassExpression[67∈10]<br />ᐸ__person__.”id”ᐳ"}}:::plan
    PgSelectSingle65 --> PgClassExpression67
    PgClassExpression69{{"PgClassExpression[69∈10]<br />ᐸ__person__...full_name”ᐳ"}}:::plan
    PgClassExpression67 o--o PgClassExpression69
    PgClassExpression71{{"PgClassExpression[71∈10]<br />ᐸ__person__.”email”ᐳ"}}:::plan
    PgClassExpression69 o--o PgClassExpression71
    PgClassExpression73{{"PgClassExpression[73∈10]<br />ᐸ__person__.”config”ᐳ"}}:::plan
    PgClassExpression71 o--o PgClassExpression73
    PgClassExpression75{{"PgClassExpression[75∈10]<br />ᐸ__person__...n_from_ip”ᐳ"}}:::plan
    PgClassExpression73 o--o PgClassExpression75

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,PgSelect10,Access11,Access12,Object13,Connection14,Lambda15,PgSelect19,Connection21,Lambda22,PgSelect26,First27,PgSelectRows28,PgSelectSingle29,PgSelect31,First32,PgSelectRows33,PgSelectSingle34,ConnectionItems36,ConnectionItems39,First46,Access47,First49,Access50,Last52,Last54 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PageInfo24,Access56,Access58 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2,PageInfo25,Access57,Access59 bucket2
    classDef bucket5 stroke:#7fff00
    class Bucket5,__Item42,Edge43,PgCursor61 bucket5
    classDef bucket6 stroke:#ff1493
    class Bucket6,__Item44,Edge45,PgCursor63 bucket6
    classDef bucket7 stroke:#808000
    class Bucket7,PgSelectSingle64 bucket7
    classDef bucket8 stroke:#dda0dd
    class Bucket8,PgSelectSingle65 bucket8
    classDef bucket9 stroke:#ff0000
    class Bucket9,PgClassExpression66,PgClassExpression68,PgClassExpression70,PgClassExpression72,PgClassExpression74 bucket9
    classDef bucket10 stroke:#ffff00
    class Bucket10,PgClassExpression67,PgClassExpression69,PgClassExpression71,PgClassExpression73,PgClassExpression75 bucket10

